package com.AddressListModule.servlet;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import util.Constant;
import util.UtilDAO;

import com.AddressListModule.bean.DirectoryBean;
import com.AddressListModule.bean.KehujifenBean;
import com.AddressListModule.bean.TbUserDirectory;
import com.AddressListModule.dao.AddressModuleDao;
import com.AddressListModule.dao.KehujifenModuleDao;
import com.AddressListModule.dao.TbUserDirectoryDAO;
import com.UserModule.bean.TbUserBean;
import com.UserModule.dao.TbUserDAO;
import com.dianbo.bean.Dianbo;
import com.dianbo.bean.DianboType;
import com.dianbo.dao.DianboDao;
import com.dianbo.dao.DianboTypeDao;
import com.jspsmart.upload.SmartUpload;

public class KehujifenServlet extends HttpServlet {

	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		response.setContentType("text/html");
		String method= request.getParameter("method");//get the name of method
		PrintWriter out = response.getWriter();
		TbUserBean user = (TbUserBean)request.getSession().getAttribute("User"); 
		if(method.equals("lookContact")){//show the contact
			String page = request.getParameter("Page");
			String phone = request.getParameter("phone");
			String condition = "1=1";
			if(!phone.equals("")){
				condition+=" and customerPhone='"+phone+"'";
			}
			 
			List<KehujifenBean> kehujifenList = new KehujifenModuleDao().getContactList("tb_kehujifen", "lastTime", condition);
			request.getSession().setAttribute("phone", phone);
			request.getSession().setAttribute("kehujifenList", kehujifenList);
			request.getSession().setAttribute("resultAdd", "");
			response.sendRedirect("AddressListModule/kehujifenList.jsp?Page="+page);
		}else if(method.equals("modifyContact")){//modify a linkMan
			String contactId = request.getParameter("mmsId");
			int num = new Random().nextInt(10000);
			KehujifenBean kehujifenBean = new KehujifenModuleDao().getContact(contactId);
			List<KehujifenBean> kehujifenList=new ArrayList<KehujifenBean>();
			kehujifenList.add(kehujifenBean);
			request.getSession().setAttribute("kehujifenBean", kehujifenBean);
			response.sendRedirect("AddressListModule/modifyKehujifen.jsp?num="+num);
		}else if(method.equals("modifyContactSubmit")){//modify a linkMan submit
			int num = new Random().nextInt(10000);
			//String linkMan = Constant.decodeString(request.getParameter("linkName"));
			String linkPhone = Constant.decodeString(request.getParameter("linkPhone"));
			String contactId = request.getParameter("mmsId");
			String customerIntegral=request.getParameter("customerIntegral");//积分
			KehujifenBean kehujifenBean = new KehujifenBean();
			kehujifenBean.setCustomerId(Integer.parseInt(contactId));
			kehujifenBean.setCustomerIntegral(customerIntegral);
			kehujifenBean.setCustomerPhone(linkPhone);
			kehujifenBean.setLastTime(Constant.decodeDate());
			String condition = "1=1";
			if(!linkPhone.equals("")){
				condition+=" and customerPhone='"+linkPhone+"'";
			}
			boolean bo = new KehujifenModuleDao().modifyContact(kehujifenBean);
			List<KehujifenBean> kehujifenList = new KehujifenModuleDao().getContactList("tb_kehujifen", "lastTime", condition);
			request.getSession().setAttribute("phone", linkPhone);
			request.getSession().setAttribute("kehujifenList", kehujifenList);
			response.sendRedirect("AddressListModule/kehujifenList.jsp?num="+num);
			
		}else if(method.equals("searchContact")){//search the contact
			String phone = request.getParameter("phone");
			String condition = "1=1";
			if(!phone.equals("")){
				condition+=" and customerPhone='"+phone+"'";
			}
			List<KehujifenBean> kehujifenList = new KehujifenModuleDao().getContactList("tb_kehujifen", "lastTime", condition);
			request.getSession().setAttribute("phone", phone);
			request.getSession().setAttribute("kehujifenList", kehujifenList);
			response.sendRedirect("AddressListModule/kehujifenList.jsp");
		}else if(method.equals("deleteAllContact")){
			String mmsId = request.getParameter("idList");
			mmsId = mmsId.substring(0, mmsId.length()-1);
			String phone = request.getParameter("phone");
			String condition = " tb_kehujifen where customerId in("+mmsId+")";
			boolean bo = UtilDAO.delAll(condition);
			String conditionT = "1=1";
			if(!phone.equals("")){
				conditionT+=" and customerPhone='"+phone+"'";
			}
			List<KehujifenBean> kehujifenList = new KehujifenModuleDao().getContactList("tb_kehujifen", "lastTime", conditionT);
			request.getSession().setAttribute("phone", phone);
			request.getSession().setAttribute("kehujifenList", kehujifenList);
			request.getSession().setAttribute("resultAdd", "删除成功");
			response.sendRedirect("AddressListModule/kehujifenList.jsp");
		}else if(method.equals("deleteContact")){//delete a contact
			String mmsId = request.getParameter("mmsId");
			String phone = request.getParameter("phone");
			boolean bo = UtilDAO.del("tb_kehujifen", "customerId", Integer.parseInt(mmsId));
			String conditionT = "1=1";
			if(!phone.equals("")){
				conditionT+=" and customerPhone='"+phone+"'";
			}
			List<KehujifenBean> kehujifenList = new KehujifenModuleDao().getContactList("tb_kehujifen", "lastTime", conditionT);
			request.getSession().setAttribute("phone", phone);
			request.getSession().setAttribute("kehujifenList", kehujifenList);
			request.getSession().setAttribute("resultAdd", "删除成功");
			response.sendRedirect("AddressListModule/kehujifenList.jsp");
		}  
		else if(method.equals("importjifenSubmit")){
			
			String realImagePath = Constant.decodeString(request
					.getParameter("realImagePath"));
			String tempPath = request.getRealPath("/")
					+ "upload".replace("\\", "/");
			String result = "";
			File file = new File(tempPath);
			if(!file.isFile()){
				file.mkdirs();
			}
			// new a SmartUpload object
			SmartUpload su = new SmartUpload();
			su.setCharset("UTF-8");// 使用时候最关键的一步
			// 上传初始化
			su.initialize(this.getServletConfig(),request,response);

			// 设定上传限制
			// 1.限制每个上传文件的最大长度。
			su.setMaxFileSize(10000000);
			// 2.限制总上传数据的长度。
			su.setTotalMaxFileSize(20000000);
			// 3.设定允许上传的文件（通过扩展名限制）,仅允许doc,txt文件。
			su.setAllowedFilesList("xls,XLS");
			boolean sign = true;
			// 4.设定禁止上传的文件（通过扩展名限制）,禁止上传带有exe,bat,jsp,htm,html扩展名的文件和没有扩展名的文件。
			try {
				su.setDeniedFilesList("exe,bat,jsp,htm,html");
				// 上传文件
				su.upload();
				// 将上传文件保存到指定目录
				tempPath = tempPath.replace("\\", "/");
				tempPath = tempPath + "/";
				
				su.save(tempPath);
				System.out.println("文件名称"+su.getFiles().getFile(0).getFileName());
				tempPath += "\\" + su.getFiles().getFile(0).getFileName();
				tempPath = tempPath.replace("\\", "/");
				tempPath = tempPath.replace("//", "/");
				System.out.println("tempsssssssssssssPath==="+tempPath);
				
				
				Workbook wb;
				InputStream is2 = new FileInputStream(tempPath);
				wb = Workbook.getWorkbook(is2);
				Sheet sheet = wb.getSheet(0);
				int row = sheet.getRows();
				List<KehujifenBean> kehujifenList = new ArrayList<KehujifenBean>();
				List allphoneList = new KehujifenModuleDao().allphone();
				List phoneList=new ArrayList();
				//// 表：手机号码，积分
				for(int i = 1;i<row;i++){
					Cell firstCell = sheet.getCell(0, i);
					String firstContent = firstCell.getContents();
					Cell secondCell = sheet.getCell(1, i);
					String secondContent = secondCell.getContents();
					System.out.println("手机号码"+firstContent);
						if(allphoneList.contains(firstContent) || phoneList.contains(firstContent)){
							continue;
						}else
						{ 
							phoneList.add(firstContent);
							KehujifenBean kehujifenbean=new KehujifenBean();
							kehujifenbean.setCustomerName("");
							kehujifenbean.setCustomerIntegral(secondContent);
							kehujifenbean.setCustomerPhone(firstContent);
							kehujifenbean.setLastTime(Constant.decodeDate());
							kehujifenList.add(kehujifenbean);
					   }
				}
				System.out.println("kehujifenList:++++"+kehujifenList.size());
				if(kehujifenList!=null&&kehujifenList.size()>0){
					boolean bo = new KehujifenModuleDao().saveContactList(kehujifenList);
					if(bo){
						result="客户信息导入成功";
					}else{
						result="客户信息导入失败";
					}
				}
				
			} catch (Exception e) {
				e.printStackTrace();
			}
		
			
			List<KehujifenBean> kehujifenList = new KehujifenModuleDao().getContactList("tb_kehujifen", "lastTime", "");
			request.getSession().setAttribute("phone", "");
			request.getSession().setAttribute("kehujifenList", kehujifenList);
			request.getSession().setAttribute("resultAdd", result);
			response.sendRedirect("AddressListModule/kehujifenList.jsp");
			
		}else if(method.equals("addkehuSubmit")){
			String phone=request.getParameter("addphone");
			String jifen=request.getParameter("jifen");
			 
			KehujifenBean kehujifenbean=new KehujifenBean();
			
			kehujifenbean.setCustomerIntegral(jifen);
			kehujifenbean.setCustomerPhone(phone);
			kehujifenbean.setCustomerName("");
			kehujifenbean.setDirId(0);
			
			kehujifenbean.setLastTime(Constant.decodeDate());
			List allphoneList = new KehujifenModuleDao().allphone();
			String result="";
			if(allphoneList.contains(phone)){
				result="此手机号码已存在，请重新添加";
			}else{
				
				boolean bo = new KehujifenModuleDao().addContact(kehujifenbean);
				System.out.println("bo:|||"+bo);
				if(bo){
					result="客户信息新增成功";
				}else{
					result="客户信息新增失败";
				}
				
				
			}
			List<KehujifenBean> kehujifenList = new KehujifenModuleDao().getContactList("tb_kehujifen", "lastTime", "");
			request.getSession().setAttribute("phone", "");
			request.getSession().setAttribute("kehujifenList", kehujifenList);
			request.getSession().setAttribute("resultAdd", result);
			response.sendRedirect("AddressListModule/kehujifenList.jsp");
		}
	}
	/**
	 * 
	 *@author qingyu zhang
	 *@function:在新建用户时对其进行通讯录赋值时的操作
	 * @param dirName
	 * @param startTime
	 * @param endTime
	 * @return
	 *2011-3-4
	 *上午09:08:13
	 *UserModule
	 *com.AddressListModule.servlet
	 *List<DirectoryBean>
	 */
	public List<DirectoryBean> getTopDirectryListUser(String dirName,String startTime,String endTime ){
		List<DirectoryBean> directoryList = new ArrayList();
		String condition = "";
		if(!dirName.equals("")){
			condition+=" and dirName like'%"+dirName+"%'";
		}
		directoryList = new KehujifenModuleDao().getAllTbDirectory("tb_directory","createTime",condition);
		return directoryList;
	}
	/**
	 * 
	 *@author qingyu zhang
	 *@function:在用户表中对一个用户的通讯录群组进行修改
	 * @param sb
	 * @param parDirId
	 * @param request
	 * @return
	 *2011-3-3
	 *下午04:18:12
	 *UserModule
	 *com.AddressListModule.servlet
	 *String
	 */
	public String getDirStringByRoleUser(StringBuffer sb,int parDirId,HttpServletRequest request,List<String> str){
		System.out.println("come heree!!!!!!====!!!"+str.size());
		StringBuffer sssb = null;
		if(sb==null){
			sssb = new StringBuffer();
		}else{
			sssb = sb ;
		}
		String condition = "parentDirId="+parDirId;
		System.out.println("condition=-"+condition);
		List<DirectoryBean> dirList = new KehujifenModuleDao().getAllTbDirectory("tb_directory","createTime",condition);
		if(dirList!=null&&dirList.size()>0){
			sssb.append(" <ul class=\"treeview\">");
			for(DirectoryBean dir:dirList){
				//sbALL.append(" <ul class=\"treeview\">");
				String strcheck="";
				if(str.contains(String.valueOf(dir.getDirId()))){
					strcheck="checked";
				}
				sssb.append("<li><input type=\"checkbox\""+strcheck+" name=\"select_Dir\" id=\""+dir.getDirId()+"\" onclick=\"ts(this);\" /><a>"+dir.getDirName()+"</a>");
				/*if(tbUser.getUserState()==0){//superadmin
					sssb.append("<li><input type=\"checkbox\" name=\"select_Dir\" id=\""+dir.getDirId()+"\" onclick=\"ts(this);\" /><a>"+dir.getDirName()+"</a>");
				}else{
					if(commonDirList.contains(dir)){
						sssb.append("<li><input type=\"checkbox\" name=\"select_Dir\" id=\""+dir.getDirId()+"\" onclick=\"ts(this);\" /><a>"+dir.getDirName()+"</a>");
					}
					
				}*/
				this.getDirStringByRoleUser(sssb,dir.getDirId(),request,str);
				sssb.append("</li>");
			}
			sssb.append("</ul>");
		}else{
			//sbALL.append("</li>");
		}
		//sbALL.append("</li>");
		return sssb.toString();
	}
/**
 * 
 *@author qingyu zhang
 *@function:get the records by conditions
 * @param dirName
 * @param tiaojian
 * @return
 *2011-2-17
 *下午02:32:23
 *AddressListModule
 *com.AddressListModule.servlet
 *List<DirectoryBean>
 */
	public List<DirectoryBean> getDirectryList(String tiaojian ){
		List<DirectoryBean> directoryList = new ArrayList();
		String condition = "";
		condition=tiaojian;
		directoryList = new KehujifenModuleDao().getAllTbDirectory("tb_directory","createTime",condition);
		return directoryList;
	}
	/**
	 * 
	 *@author qingyu zhang
	 *@function:get the first level Directory
	 * @param dirName
	 * @param startTime
	 * @param endTime
	 * @return
	 *2011-2-17
	 *下午03:12:49
	 *AddressListModule
	 *com.AddressListModule.servlet
	 *List<DirectoryBean>
	 */
	public List<DirectoryBean> getTopDirectryList(String dirName,String startTime,String endTime ){
		List<DirectoryBean> directoryList = new ArrayList();
		
		String condition = "";
		condition+="dirLevel=0 ";
		if(!startTime.equals("")){
			condition+=" and userId="+startTime;
		}
		if(!dirName.equals("")){
			condition+=" and dirName like'%"+dirName+"%'";
		}
		directoryList = new KehujifenModuleDao().getAllTbDirectory("tb_directory","createTime",condition);
		return directoryList;
	}
	
	/**
	 * 
	 *@author qingyu zhang
	 *@function:have not the checkBox
	 * @param parDirId
	 * @return
	 *2011-2-19
	 *上午11:09:38
	 *AddressListModule
	 *com.AddressListModule.servlet
	 *String
	 */
	public String getDirStringShow(StringBuffer sb,int parDirId){
		StringBuffer ssb =null;
		if(sb==null){
			ssb = new StringBuffer();
		}else{
			ssb = sb;
		}
		String condition = "parentDirId="+parDirId;
		List<DirectoryBean> dirList = new KehujifenModuleDao().getAllTbDirectory("tb_directory","createTime",condition);
		if(dirList!=null&&dirList.size()>0){
			ssb.append(" <ul class=\"treeview\">");
			for(DirectoryBean dir:dirList){
				//sbALL.append(" <ul class=\"treeview\">");
				ssb.append("<li class=\""+dir.getDirId()+"\"><a onClick=\"$.msgbox({height:510,width:800,content:{type:'iframe',content:'./AddressServlet?method=getLinkMan&Page=1&Page=1&dirId="+dir.getDirId()+"'},title: '联系人列表'})\" value=\""+dir.getDirName()+"\" >"+dir.getDirName()+"</a><span title=\"添加通讯录\" class=\"addnode\"><a style=\"cursor:hand\" onclick=\"$mb=$.msgbox({height:220,width:500,content:{type:\'ajax\',content:\'./AddressServlet?method=addDir&dirLevel="+dir.getDirLevel()+"&dirId="+dir.getDirId()+"\'},title:\'新增通讯录\',onAjaxed: function(data){}});\">添加通讯录</a></span><span title=\"编辑通讯录\" class=\"editnode\"><a style=\"cursor:hand\" onclick=\"$mb=$.msgbox({height:220,width:500,content:{type:\'ajax\',content:\'./AddressServlet?method=modifyDir&dirLevel="+dir.getDirLevel()+"&dirId="+dir.getDirId()+"\'},title:\'编辑通讯录\',onAjaxed: function(data){}});\">编辑通讯录</a></span><span title=\"删除通讯录\" class=\"delnode\"><a style=\"cursor:hand\" onclick=\"$mb=$.msgbox({height:220,width:500,content:{type:\'ajax\',content:\'./AddressServlet?method=deleteDir&dirLevel="+dir.getDirLevel()+"&dirId="+dir.getDirId()+"\'},title:\'删除通讯录\',onAjaxed: function(data){}});\">删除通讯录</a></span><span title=\"新增联系人\" class=\"addLinkMan\"><a style=\"cursor:hand\" onclick=\"$mb=$.msgbox({height:400,width:500,content:{type:\'ajax\',content:\'./AddressServlet?method=addLinkMan&dirLevel="+dir.getDirLevel()+"&dirId="+dir.getDirId()+"\'},title:\'新增联系人\',onAjaxed: function(data){}});\">新增联系人</a></span><span title=\"导入联系人\" class=\"importLinkMan\"><a style=\"cursor:hand\" onclick=\"$mb=$.msgbox({height:220,width:500,content:{type:\'ajax\',content:\'./AddressServlet?method=importLinkMan&dirLevel="+dir.getDirLevel()+"&dirId="+dir.getDirId()+"\'},title:\'导入联系人\',onAjaxed: function(data){}});\">导入联系人</a></span>");
				this.getDirStringShow(ssb,dir.getDirId());
				ssb.append("</li>");
			}
			ssb.append("</ul>");
		}else{
			//sbALL.append("</li>");
		}
		//sbALL.append("</li>");
		return ssb.toString();
	}
	/**
	 * 
	 *@author qingyu zhang
	 *@function:get the linkMan by directoryId
	 * @param dirId
	 * @return
	 *2011-2-19
	 *下午02:46:09
	 *AddressListModule
	 *com.AddressListModule.servlet
	 *StringBuffer
	 */
	public List getLinkMan(int dirId){
		String condition ="dirId="+dirId;
		List<KehujifenBean> kehujifenList = new KehujifenModuleDao().getContactList("tb_kehujifen", "lastTime", condition);
		if(kehujifenList==null){
			kehujifenList = new ArrayList();
		}
		return kehujifenList;
	}
	/**
	 * 
	 *@author qingyu zhang
	 *@function:get linkMans by dirIds (1,2,3,4....)
	 * @param dirIds
	 * @return
	 *2011-2-26
	 *下午03:15:42
	 *MmsModule
	 *com.AddressListModule.servlet
	 *List
	 */
	public List<KehujifenBean> getLinkMans(String tiaojian){
		String condition =tiaojian;
		List<KehujifenBean> kehujifenList = new KehujifenModuleDao().getContactList("tb_kehujifen", "lastTime", condition);
		if(kehujifenList==null){
			kehujifenList = new ArrayList();
		}
		return kehujifenList;
	}
	/**
	 * 
	 *@author qingyu zhang
	 *@function:get the directory by role
	 * @param dirName
	 * @param tiaojian
	 * @return
	 *2011-2-25
	 *上午10:18:31
	 *MmsModule
	 *com.AddressListModule.servlet
	 *List<DirectoryBean>
	 */
	public List<TbUserDirectory> getDirectryListByRole(String tiaojian ){
		List<TbUserDirectory> directoryList = new ArrayList();
		String condition = "";
		condition=tiaojian;
		directoryList = new KehujifenModuleDao().getUserDirByRole("tb_userDirectory","createDate",condition);
		return directoryList;
	}
	/**
	 * 
	 *@author qingyu zhang
	 *@function:get a Directory 
	 * @param tableName
	 * @param inKey
	 * @param keyValue
	 * @return
	 *2011-2-25
	 *上午10:46:13
	 *MmsModule
	 *com.AddressListModule.servlet
	 *DirectoryBean
	 */
	public DirectoryBean getDirectory(String tableName,String inKey,int keyValue){
		DirectoryBean dir = new KehujifenModuleDao().getDirectory(tableName, inKey,keyValue);
		return dir;
	}
	/**
	 * 
	 *@author qingyu zhang
	 *@function:get common direcotry from tb_userDirectory
	 * @param sb
	 * @param parDirId
	 * @return
	 *2011-2-25
	 *上午10:51:49
	 *MmsModule
	 *com.AddressListModule.servlet
	 *String
	 */
	public String getDirStringByRole(StringBuffer sb,int parDirId,HttpServletRequest request){
		StringBuffer sssb = null;
		if(sb==null){
			sssb = new StringBuffer();
		}else{
			sssb = sb ;
		}
		TbUserBean tbUser = (TbUserBean)request.getSession().getAttribute("User");
		String condition = "parentDirId="+parDirId;
		List<DirectoryBean> dirList = new KehujifenModuleDao().getAllTbDirectory("tb_directory","createTime",condition);
		if(dirList!=null&&dirList.size()>0){
			sssb.append(" <ul class=\"treeview\">");
			for(DirectoryBean dir:dirList){
				//sbALL.append(" <ul class=\"treeview\">");
				sssb.append("<li><input type=\"checkbox\" name=\"select_Dir\" id=\""+dir.getDirId()+"\" onclick=\"ts(this);\" /><a>"+dir.getDirName()+"</a>");
				/*if(tbUser.getUserState()==0){//superadmin
					sssb.append("<li><input type=\"checkbox\" name=\"select_Dir\" id=\""+dir.getDirId()+"\" onclick=\"ts(this);\" /><a>"+dir.getDirName()+"</a>");
				}else{
					if(commonDirList.contains(dir)){
						sssb.append("<li><input type=\"checkbox\" name=\"select_Dir\" id=\""+dir.getDirId()+"\" onclick=\"ts(this);\" /><a>"+dir.getDirName()+"</a>");
					}
					
				}*/
				this.getDirStringByRole(sssb,dir.getDirId(),request);
				sssb.append("</li>");
			}
			sssb.append("</ul>");
		}else{
			//sbALL.append("</li>");
		}
		//sbALL.append("</li>");
		return sssb.toString();
	}
	/**
	 * 
	 *@author qingyu zhang
	 *@function:所赋予权限中通讯录只有大于一级目录的存在
	 * @param commonDirList
	 * @param condition
	 * @return
	 *2011-3-1
	 *上午09:23:28
	 *MmsModule
	 *com.AddressListModule.servlet
	 *List<DirectoryBean>                  7  5
	 */
	public List<String> dirLst(List<DirectoryBean> commonDirList){
		List<String> lastDirLst = new ArrayList<String>();
		for(DirectoryBean db :commonDirList){
			lastDirLst.add(String.valueOf(db.getDirId()));
		}
		for(DirectoryBean directory:commonDirList){
			String condition ="parentDirId="+directory.getDirId();
			List<DirectoryBean> chilDirectory= this.getDirectryList(condition);
			if(chilDirectory!=null&&chilDirectory.size()>0){
				for(int v = 0;v<chilDirectory.size();v++){
					DirectoryBean chilDir = chilDirectory.get(v);
					if(lastDirLst.contains(String.valueOf(chilDir.getDirId()))){
						boolean bo   = lastDirLst.remove(String.valueOf(chilDir.getDirId()));
					}
				}
				
			}
		}
		return lastDirLst;
	}
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		
		this.doGet(req, resp);
		
	}

	/**
	 *@author qingyu zhang
	 *@function:
	 *2011-2-17
	 *下午02:13:57
	 *AddressListModule
	 *com.AddressListModule.servlet
	 */
}
